package tk.hongbo.socket;

import javax.websocket.Session;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class SocketManager {

    private static Map<String, Session> sessionMap = new ConcurrentHashMap<>();

    public static void put(String name, Session session) {
        sessionMap.put(name, session);
    }

    public static void remove(String name) {
        sessionMap.remove(name);
    }

    public static Map<String, Session> getAll() {
        return sessionMap;
    }

}
